<%@ page import="org.xilin.Course"%>
<g:setProvider library="jquery"/>

<div>
  <table align="center">
    <th nowrap="nowrap">Buy the book for the course ${courseInstance.name}?</th>
    <tr>
      <td class="show"><a href="#" title="Book Detail" rel="${request.contextPath}/book/show/${courseInstance?.book?.id}">Book Details</a> </td>
      <td></td>
    </tr>
    <tr><td>
  <span class="btn left">
            <g:remoteLink action="addCourse" update=".content" params="'courseId=${courseInstance.id}&book=yes'">Yes</g:remoteLink>
   </span>
      </td>
      <td>
        <span class="btn right">
            <g:remoteLink action="addCourse" update=".content" params="'courseId=${courseInstance.id}&book=no'">No</g:remoteLink>
   </span>
      </td>
    </tr>
  </table>
</div>

<script type="text/javascript">
  $(function(){
      setupAdminList({controller:'classRegister', action:'addBook'});
  });
</script>